package net.goutalk.glcs.module.system.controller;

import net.goutalk.glcs.common.constant.GlobalConstant;
import net.goutalk.glcs.common.model.result.R;
import net.goutalk.glcs.module.system.service.IAuthorizeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tanyujie
 * @since 2022-03-16
 */
@RestController
@RequestMapping(GlobalConstant.SYSTEM_MODULE_PREFIX + "/authorize")
@Api(value = GlobalConstant.SYSTEM_MODULE_PREFIX + "/authorize",tags = "授权表")
@AllArgsConstructor
public class AuthorizeController {

    private final IAuthorizeService authorizeService;

    @GetMapping("/permissions")
    @ApiOperation(value="授权信息表")
    public R permissions(){
        return R.ok(authorizeService.getPermissions());
    }
}
